package praktikumid.w06.p1;

public class Motorcycle extends Vehicle {

	/**
	 * @param args
	 */
	private boolean hasSideCar;
	
	public Motorcycle(String registrationNo, boolean hasSideCar) {
		super.setRegistrationNumber(registrationNo);
		this.hasSideCar = hasSideCar;
	}
	
	public boolean getHasSideCar() {
		return this.hasSideCar;
	}
	
	public void setHasSideCar(boolean c) {
		this.hasSideCar = c;
	}

	@Override
	public String toString() {
		if(this.hasSideCar) {
			return "regno: " + super.getRegistrationNumber() + "\nMotorcycle has sidecar!";
		}
		else {
			return "regno: " + super.getRegistrationNumber() + "\nMotorcycle does not have a sidecar!";
		}
	}
	
}
